//
//  DistributStuHead.m
//  ZHZtest
//
//  Created by 李彦宏 on 2018/1/12.
//  Copyright © 2018年 LYH. All rights reserved.
//

#import "DistributStuHead.h"
@implementation DistributStuHead

//自定义head初始化方法
- (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithReuseIdentifier:reuseIdentifier];
    if (self) {
        [self setUI];
    }
    return self;
}
//添加子控件
-(void)setUI{
    //添加子控件
    UILabel *lb1=[[UILabel alloc]init];
    lb1.text=@"学员";
    lb1.textAlignment=NSTextAlignmentCenter;
    [self.contentView addSubview:lb1];
    UILabel *lb2=[[UILabel alloc]init];
    lb2.text=@"研究生";
     lb2.textAlignment=NSTextAlignmentCenter;
    [self.contentView addSubview:lb2];
    UILabel *lb3=[[UILabel alloc]init];
    lb3.text=@"专业";
    lb3.textAlignment=NSTextAlignmentCenter;
    [self.contentView addSubview:lb3];
    //设置fram

    [lb1 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.size.mas_equalTo(CGSizeMake(ScreenWidth/2-40, 30));
        make.top.equalTo(self.contentView).offset(5);
        make.bottom.equalTo(self.contentView).offset(5);
        make.right.equalTo(lb2.mas_left).offset(5);
        
        
    }];
    [lb2 mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.centerY.equalTo(lb1);
        make.centerX.equalTo(self.contentView);
        make.size.mas_equalTo(CGSizeMake(80, 30));
        
    }];
    [lb3 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(lb1);
        make.size.mas_equalTo(CGSizeMake(ScreenWidth/2-40, 30));
        make.left.equalTo(lb2.mas_right).offset(5);
    }];
    
 
}



@end
